<template>
	<view class="page" v-if="loadding" :style="{minHeight:windowHeight+'px'}">
		<view class="head">
			<image @click="gotoReturn()" src="../../../static/app/jiaotou1.png"></image>
			<view>客服中心</view>
			<view></view>
		</view>
		<!-- <view class="title">
			客服中心
		</view> -->
		<view class="usehelp problem">
			<view class="usehelp-text problem-text">
				<text>常见问题</text>
			</view>
			<view class="usehelp-line problem-line"></view>
			<view class="usehelp-content problem-content">
				<ul class="usehelp-list problem-list" v-for=" (item,index) of listData" :key="index">
					<li>
						<view class="problem-li-content" @click="gotoDetail(item.article_id)">
							<text>{{item.article_title}}</text>
							<image src="../../../static/jiantou3.png"></image>
						</view>
					</li>
					<!-- <li>
						<view class="problem-li-content">
							<text>如何取消订单?</text>
							<image src="../../../static/jiantou3.png"></image>
						</view>
					</li>
					<li>
						<view class="problem-li-content">
							<text>无法支付订单?</text>
							<image src="../../../static/jiantou3.png"></image>
						</view>
					</li>
					<li>
						<view class="problem-li-content">
							<text>获取不到验证码怎么办呐?</text>
							<image src="../../../static/jiantou3.png"></image>
						</view>
					</li>
					<li>
						<view class="problem-li-content">
							<text>如何绑定第三方账号或更换手机号?</text>
							<image src="../../../static/jiantou3.png"></image>
						</view>
					</li>
					<li>
						<view class="problem-li-content">
							<text>如何投诉?</text>
							<image src="../../../static/jiantou3.png"></image>
						</view>
					</li>
					<li>
						<view class="problem-li-content">
							<text>订单优惠使用说明?</text>
							<image src="../../../static/jiantou3.png"></image>
						</view>
					</li> -->
				</ul>
			</view>
		</view>
		<view class="null d-c-c p30" v-if="listData.length == 0">
			<text class="iconfont icon-wushuju"></text>
			<text class="cont">亲，暂无相关记录哦</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				loadding:false,
				windowHeight:'',
				listData:[],
			}
		},
		onLoad(){
			uni.getSystemInfo({
				success: (res) => {
					this.windowHeight = res.windowHeight;
				}
			})
		},
		onShow() {
			this.getInfo();
		},
		methods: {
			gotoReturn(){
				uni.navigateTo({
					url:'/pagesUser/user/index/index'
				})
			},
			/* 详情 */
			gotoDetail(id){
				uni.navigateTo({
					url:'/pagesUser/information/service-info/detail/detail?select=1&&id='+id
				})
			},
			/* 获取消息 */
			getInfo() {
				let self = this;
				uni.showLoading({
					title: '加载中'
				});
				self._post('plus.article.Article/index', {
						category_id: 10025
					},
					function(res) {
						self.listData = res.data.list.data;
						self.loadding = true;
						uni.hideLoading();
					});
			},
		}
	}
</script>

<style>
	.page{
		width: 100%;
		overflow: hidden;
		margin-top: 100rpx;
	}
	.head{
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 300px;
		font-size: 32rpx;
		padding: 20rpx 10rpx;
		font-weight: 800;
		margin-left: 10rpx;
	}
	.head image{
		width: 44rpx;
		height: 54rpx;
		margin-right: 76rpx;
	}
	.title{
		width: 100%;
		//line-height: 300rpx;
		text-align: center;
		font-size: 30rpx;
	}
	.usehelp{
		background-color: #FFFFFF;
	}
	.usehelp-text{
		margin: 40rpx 36rpx 20rpx;
		height: 50rpx;
		border-left: 6rpx solid #007AFF;
	}
	.usehelp-text text{
		font-size: 40rpx;
		font-weight: 600;
		text-align: center;
		line-height: 40rpx;
		margin-left: 50rpx;
	}
	.problem-list{
		padding: 0 20rpx;
	}
	.problem-list li{
		padding-left: 0rpx;
		margin-left: 0rpx;
		width: 96%;
		height: 120rpx;
		margin: 0 auto;
		line-height: 120rpx;
		border-bottom: 1rpx solid #CCCCCC;
		list-style: none;
	}
	.problem-list li:last-child {
		border-bottom: none;
	}
	.problem-text{
		position: relative;
		top: 20rpx;
	}
	.problem-line{
		margin-top: 60rpx;
	}
	.problem-li-content{
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items:center;
		font-size: 28rpx;
	}
	.problem-li-content image{
		width: 60rpx;
		height: 50rpx;
	}
	
	
	.item-con {
		width: 96%;
	
		margin: 40rpx auto 0;
		//background-color: #FFFFFF;				
	}
	
	.item-con-time {
		margin-bottom: 40rpx;
		font-size: 28rpx;
		text-align: center;
	}
	
	.item-con-content {
		background-color: #FFFFFF;
		padding: 30rpx;
		box-shadow: 0 0 30rpx 2rpx #dfd9cf;
	}
	
	.item-con-content-title {
		display: flex;
		align-items: center;
		justify-content: space-between;
	}
	
	.item-con-content-title view {
		font-size: 30rpx;
		font-weight: 800;
	}
	
	.item-con-content-title image {
		width: 46rpx;
		height: 46rpx;
	}
	
	.item-con-content-info {
		display: flex;
		align-items: center;
		margin: 10rpx 0;
		font-size: 26rpx;
	}
	.item-con-content-info view{
		width: 80%;
		/* overflow: hidden;
		text-overflow:ellipsis;
		white-space: nowrap; */
	}
	.item-con-content-time {
		color: #999999;
	}
	.null{
		width: 100%;
		height: 100%;
		position: fixed;
		top: 0rpx;
		background-color: #F4F4F4;
		z-index: 99;
	}
</style>
